package com.example.finalwork06.Controller;

import com.example.finalwork06.Common.Result;
import com.example.finalwork06.Entity.SecuritiesAlerts;
import com.example.finalwork06.Service.SecuritiesAlertsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/alerts")
public class SecuritiesAlertsController {
    @Autowired
    private SecuritiesAlertsService securitiesAlertsService;

    @GetMapping
    public Result getAllSecuritiesAlerts() {
        List<SecuritiesAlerts> list=securitiesAlertsService.selectAll();
        return Result.success(list);
    }
}
